<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>网站后台管理模版</title>
		<link rel="stylesheet" href="lib/layui-v2.5.5/css/layui.css" media="all">
		<link rel="stylesheet" href="css/public.css" media="all">
		<link rel="stylesheet" href="css/my/qadetail.css" >

	</head>
	<body>

	<h2 id="question"></h2>

	<br/>
	<div>
		<span id="type"></span>
		<span id="readNum">0</span>阅读
		<span id="publishTime"></span>
	</div>
	<br/>
	<div>
		<span id="commentsNum">0</span>条评论
		<span id="collectNum">0</span>人收藏
	</div>
	<div id="reply" th:insert="~{page/qs/reply :: rep}">

		没有更多回复了...
	</div>

<script src="lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script src="api/baseApi.js" charset="utf-8"></script>
<script>
	layui.use(['layer'], function(){
		var $ = layui.$;
		var layer = layui.layer;

		//获取页面传过来的数据
		let localData = layui.sessionData("qsData");
		let qs = localData.qs;
		console.log(qs);
		$('#question').html(qs.question);
		$('#type').html(qs.name);
		$('#readNum').html(qs.readNum);
		$('#publishTime').html(new Date(qs.publishTime));

		$('#collectNum').html(qs.collectNum);


		/*$.ajax({
			url: baseUrl + qsBaseUrl + qs.id,
			type: 'get',
			dataType: "json",
			contentType: "application/json;charset=UTF-8",
			success:function(res){
				console.log(res);
				$("#reply").html(res);
			}
		})*/

	});
</script>
</body>
</html>